<template>
    <view class="seats">
        <view class="seats-left">
            <view class="seats-name">自动换座</view>
            <view class="seats-tips">所选座位被占时，自动调座到附近</view>
        </view>
        <u-switch :size="20" @change="switChange" activeColor="#ff8e0c" inactiveColor="#dcd9d9" v-model="form.changeSeat" :space="2"></u-switch>
    </view>
</template>

<script>
export default {
    props: {
        form: {
            type: Object,
            default: () => {
                return {
                    changeSeat: false,
                };
            },
        },
    },
    methods: {
        switChange() {
            this.$emit('update:form', this.form);
        },
    },
};
</script>

<style lang="scss" scoped>
.seats {
    padding: 30rpx;
    border-radius: 20rpx;
    background-color: #ffffff;
    display: flex;
    &-left {
        flex: 1;
    }
    &-name {
        @include font(28rpx, #333333, bold);
    }
    &-tips {
        margin-top: 10rpx;
        @include font(26rpx, #999999, 400);
    }
}
</style>
